<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <script>
    'use strict';
/*
  function student(name){
    this.name = name;
  }
  */
    class student{
      constructor(name) {
        this.name = name;
      }
      hello(){
        alert("hello");
      }
    }

    var xiaoming = new student("xiaoming");
    var xiaohong = new student("xiaohong");

    class pupil extends student{
      constructor(name,grade) {
        super(name);

        this.grade= grade;
      }
      myGrade(){
        alert("我是小学生！");
      }
    };

    var xiaoming = new student("xiaoming");
    var xiaohong = new pupil("xiaohong",1);

  </script>
</head>
<body>

</body>
</html>